package chpt01;

import java.util.Scanner;
import java.lang.Math;

public class SquareRoot {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		double epsilon=0.0001;
		while(in.hasNextDouble()){
			double x=in.nextDouble();
			if(x<0){
				System.out.println(Double.NaN);
				continue;
			}
			for(double i=0;;i+=epsilon){
				if(x-Math.pow(i, 2)<epsilon||Math.pow(i, 2)>=x){
					System.out.printf("%.6f\n",i);
					break;
				}
			}
		}
		in.close();
	}

}
